/**
 * com.dingjian.permission.dao.impl.ShortcutsDaoImpl.java
 */
package com.dingjian.permission.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.dingjian.base.dao.impl.BaseDaoImpl;
import com.dingjian.permission.dao.ShortcutsDao;

/**
 * @author FengMy
 * 
 * @since 2012-9-14
 */
@Component(value="shortcutsDao")
public class ShortcutsDaoImpl extends BaseDaoImpl implements ShortcutsDao {

	@Override
	protected String getNameSpace() {
		return "com.dingjian.permission.dao.ShortcutsDao";
	}

	@Override
	public int getMaxIndex(Map<String,Object> param) {
		@SuppressWarnings("unchecked")
		List<Integer> result = getSqlSession().selectList(getNameSpace() + ".getMaxIndex",param);
		return (result==null || result.size()==0)?-1:(result.get(0)==null)?0:result.get(0);
	}
}
